==============================================================
 LEDGERBRIDGE  0.2.0   -   RE-INSTALL TO FIX THE SYNC
==============================================================

If LedgerBridge is already on this PC, just run the setup again.
It keeps your existing Sync Key and folder, replaces the program
and repairs the schedule. Nothing is asked twice.

The program now always installs itself to C:\LedgerBridge, no
matter where this folder is when you run Setup - so it does not
matter where you unzip this. After Setup you may delete the
folder you unzipped; do NOT delete C:\LedgerBridge itself.
A "LedgerBridge Status" icon is placed on the desktop - that is
all anyone ever needs to open.

This version fixes the fault that stopped the sync for two days:
a network drop could freeze a sync forever, and every later sync
then quietly skipped while reporting success.

  * a frozen sync now dies instead of blocking the next one
  * a lost connection now fails in seconds, and is retried
  * a skipped run is now reported instead of hidden
  * every run is written to a log on this PC
  * a failure that happens with no internet is remembered and
    sent as soon as the connection is back

--------------------------------------------------------------

LEDGERBRIDGE - SETUP ON THIS PC
==============================================================

If you downloaded this as a ZIP, EXTRACT it first. Do not run
anything from inside the zip - Windows runs it from a temporary
folder that gets deleted, and the daily sync would break.

Extract, then copy the whole LedgerBridge folder somewhere
permanent, for example
   C:\LedgerBridge      or      D:\LedgerBridge
Either drive is fine.

Google Chrome may warn that the file "isn't commonly downloaded".
Click Keep. The download is fine - it is simply new and not yet
certificate-signed.

Do not run it from a USB stick, Downloads or the Desktop. The
daily schedule remembers exactly where these files are, so if
the folder moves or is deleted later, syncing stops.

--------------------------------------------------------------
RUN THE SETUP
--------------------------------------------------------------
It creates the daily schedule so the sync runs even on battery
and catches up after a missed slot.

--------------------------------------------------------------
Right-click  "LedgerBridge Setup.exe"
   -> Run as administrator          (this matters)

If Windows shows a blue "Windows protected your PC" box:
   click  More info  ->  Run anyway
It is not a virus warning - the file is simply not yet
certificate-signed.

Then follow the six steps:

  Sync Key    Vikas will send this to you separately - it is NOT
              in the download, because it is a password. Copy the
              whole line, paste it, click "Check this key".
              >> It must show:  SDR Agarwal & Sons
              If it shows any other name, STOP and call Vikas.

  SoftTrade   Point it at the live company folder, usually
              ending in  \SONS\001 , then click "Test this
              folder".
              >> Check the date it reports is close to TODAY.
              If it shows an old date, it is reading a backup
              instead of the live books - STOP and call Vikas.

  Schedule    Leave the default: 12:00, 15:00, 18:00

  Install     Wait. The first sync takes a few minutes.

--------------------------------------------------------------
STEP 3  Afterwards
--------------------------------------------------------------
* Delete the message containing the Sync Key. Setup has already
  stored its own encrypted copy on this PC.

* To check things later, open "LedgerBridge Status" from the
  Start Menu or from this folder. Green means working.

--------------------------------------------------------------
IMPORTANT
--------------------------------------------------------------
SoftTrade is only ever READ. Every file is copied first and the
copy is read. The books are never opened for writing and
nothing in them is changed.

This PC must be switched on at the sync times. If it was off,
the sync runs automatically once it is next started.

If anything looks wrong: open LedgerBridge Status, click
"Copy diagnostics", and send that to Vikas.

If a sync did NOT happen when it should have, right-click
"WHY NO SYNC (run as admin).bat" and choose Run as administrator
(or just double-click it and click Yes). It says which of the
three schedules ran, what Windows recorded, and whether the PC
was even switched on at the time. Send Vikas a photo of the
window.

If that shows a sync ran but FAILED (result 1), right-click
"SHOW THE ERROR (run as admin).bat" and Run as administrator.
It runs the same job in a visible window so the real error can
be read, and saves it to ledgerbridge-error.txt on the Desktop.
